import request from '@/utils/request'

export function getLegalList(query) {
  return request({
    url: '/web-api/api/legalPerson',
    method: 'get',
    params: query
  })
}

export function getLegalAll(query) {
  return request({
    url: '/web-api/api/legalPerson/list',
    method: 'get',
    params: query
  })
}

export function addLegal(data) {
  return request({
    url: '/web-api/api/legalPerson',
    method: 'post',
    data
  })
}

export function delLegal(ids) {
  return request({
    url: '/web-api/api/legalPerson',
    method: 'delete',
    data: ids
  })
}

export function editLegal(data) {
  return request({
    url: '/web-api/api/legalPerson',
    method: 'put',
    data
  })
}

export function downloadLegal(query) {
  return request({
    url: '/web-api/api/legalPerson/download',
    method: 'get',
    params: query
  })
}

export const downloadUrl = '/web-api/api/legalPerson/download'

